package net.wofly.right.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Arrays;
import java.util.List;

/**
 * 收货地址
 *
 * @author lign
 * @version 1.0
 * @created 20-9月-2017 20:20:30
 */
@Data
@Entity
@Table(name = "sale_right_receivingaddr")
@ApiModel(description = "收货地址")
public class ReceivingAddr {

    @Id
    private String receivingAddrID;
    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人", required = true)
    private String contacts;
    /**
     * 地址所属ID
     * 个人客户为客户的UserID
     * 企业用户为企业组织机构ID
     */
    @ApiModelProperty(value = "客户ID", required = true)
    private String userID;
    /**
     * 是否为默认地址的标识
     * 1为默认地址 0为非默认
     */
    @ApiModelProperty(value = "是否为默认地址的标识", required = true)
    private Integer defaultFlag = 0;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", required = true)
    private String mobile;
    /**
     * 邮编
     */
    @ApiModelProperty(value = "邮编")
    private String postCode;
    /**
     * 收货地址
     */
    @ApiModelProperty(value = "收货地址", required = true)
    private String receivingAddr;

    private Integer status;
    
    /**
     * 操作人员用户ID
     */
    @ApiModelProperty(value = "操作人员ID", required = true)
    private String optUserID;
    
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间", required = false)
    private Long modifyDate;

    /**
     * 选定的地区字符串
     */
    @ApiModelProperty(value = "选定的地区字符串", required = false)
    private String selectedRegionStr;

    /**
     * 选定的地区字符串数组
     */
    @ApiModelProperty(value = "选定的地区字符串数组", required = false)
    @Transient
    private List<String> selectedRegion;

    public ReceivingAddr() {

    }
    @Override
    public void finalize() throws Throwable {

    }

}